package com.xw.dao;

import com.xw.model.Videos;
import com.xw.util.MyMapper;
import com.xw.vo.UserInfoVo;
import com.xw.vo.VideosVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface VideosMapper extends MyMapper<Videos> {
    List<VideosVo> findByWhere(@Param("videoName") String videoName, @Param("stIdOne") String stIdOne, @Param("stIdTwo") String stIdTwo,
                               @Param("stIdThree") String stIdThree, @Param("checkStatus") Integer checkStatus,@Param("isDel") Integer isDel);

    List<VideosVo> searchVideos(@Param("searchName") String searchName);

    List<VideosVo> recommentVideos();

    List<VideosVo> findTopSaleCountCurMonth(@Param("curMonth") String curMonth);

    List<VideosVo> findTopSaleCountCurWeek(@Param("curWeek") String curWeek);

    List<VideosVo> findVideosByType(@Param("searchName")String searchName, @Param("sort") Integer sort, @Param("stIdOne") String stIdOne, @Param("stIdTwo") String stIdTwo);

    VideosVo findByVideoId(@Param("videoId")String videoId);

    UserInfoVo getVideoTeacher(@Param("video") VideosVo videosVo);

    List<VideosVo> findVideoBySearchName(@Param("searchName") String searchName);

    List<Videos> findTeacherRecommendVideosMP(@Param("teacherId") String teacherId);

    List<Videos> findTeacherAllVideosMP(@Param("teacherId") String teacherId);

    List<Videos> findBuyTeacherVideosByUserIdMP(@Param("userId") String userId,@Param("teacherId") String teacherId);

    List<VideosVo> searchVideosMP(@Param("userId") String userId,@Param("sort") Integer sort,@Param("stIdOne") String stIdOne,@Param("stIdTwo") String stIdTwo);

    Integer downVideoByUserId(@Param("userId") String userId);

    List<Videos> findVideosByUserId(@Param("userId") String userId);

    List<Videos> getCheckingAndPassVideo(@Param("userId") String userId);

    List<Videos> getCheckingVideo(@Param("userId") String userId);

    List<Videos> getCheckPassVideo(@Param("userId") String userId);

    List<Videos> getCheckNoPassVideo(@Param("userId") String userId);
}